x = -8:0.1:8;
signal1 = exp(-pi*(x-4).^2);

figure,plot(x,signal1);title('Plot of exp[-pi(x-4)^2]');xlabel('time');

noise1 = exp(-j*pi*x.*x);
noise1(x<=-8 | x>=8)=0;
figure,plot(x,abs(noise1));title('Plot of exp[-j*pi*x^2]');

sig = signal1+noise1;

figure,plot(x,abs(sig)),title('Signal corrupted by additive complex noise');

F = fft(abs(sig));

Ts = x(2)-x(1);
Ws = 2*pi/Ts;
N = length(x);
W=Ws*(-N/2:N/2-1)/N*(1/2);
figure,plot(W,fftshift(abs(F)*Ts));xlabel('Frequency'),ylabel('Amplitude');title('Fourier Transform of noisy signal');

FRT = frft(sig,0.32);
figure,plot(x,abs(FRT));xlabel('Frequency'),ylabel('Amplitude');title('FRT of the noisy signal');

